function d = projHs(invP,hs)

d = cellfun(@(x)full(sum(invP.Q.*x',2))',hs,'UniformOutput',false);
d = cell2mat(d);